<template>
  <div class="home">
    <a-layout id="components-layout-demo-top-side-2">
      <a-layout-header class="header">
        <a-menu
        theme="dark"
        mode="horizontal"
        :default-selected-keys="['3']"
        :style="{ lineHeight: '64px' }"
        >
          <a-menu-item key="1">
            <a-icon type="user-add" />
             用户
          </a-menu-item>
          <a-menu-item key="2">
            <a-icon type="align-center" />
            教学
          </a-menu-item>
          <a-menu-item key="3">
            <a-icon type="align-right" />
            题库
          </a-menu-item>
          <a-menu-item key="4">
            <a-icon type="bar-chart" />
            运营
          </a-menu-item>
          <a-menu-item key="5">
            <a-icon type="area-chart" />
            营销
          </a-menu-item>
          <a-menu-item key="6">
          <a-icon type="shopping-cart" />
            商品
          </a-menu-item>
          <a-menu-item key="7">
          <a-icon type="transaction" />
            财务
          </a-menu-item>
          <a-menu-item key="8">
            <a-icon type="fund" />
            统计
          </a-menu-item>
          <a-menu-item key="">
            <a-icon type="apple" />
            系统
          </a-menu-item>
        </a-menu>
      </a-layout-header>
      <a-layout>
         <a-layout-sider width="200" style="background: #fff">
           <a-menu
           mode="inline"
           :default-selected-keys="['1']"
           :default-open-keys="['sub1']"
           :style="{ height: '100%', borderRight: 0 }"
           @click="onClick"
           >
             <a-menu-item key="1" >
              <a-icon type="user" />
              <span>学员管理</span>
             </a-menu-item>
             <a-menu-item key="2">
              <a-icon type="video-camera" />
              <span>助教管理</span>
             </a-menu-item>
             <a-menu-item key="3">
              <a-icon type="upload" />
              <span>讲师管理</span>
             </a-menu-item>
           </a-menu>
         </a-layout-sider>
         <a-layout-content
         :style="{ background: '#fff', padding: '24px', margin: 0, minHeight: '280px'}"
         >
          <router-view/>
        </a-layout-content>
      </a-layout>
    </a-layout>
  </div>
</template>

<script>
export default {
  name: 'Home',
  components: {
    
  },
  data(){
    return{
      users:[],
      columns:[
        {

        }
      ]
    }
  },
  mounted(){
   
  },
  methods:{
    onClick(object){
      console.log(object)
      if(object.key === "1"){
        this.$router.push("/")
      }else if(object.key === "2"){
        this.$router.push("/teacher")
      }else{
        this.$router.push("/assistant")
      }
    }
  }
}
</script>

<style scoped>
#components-layout-demo-top-side-2 .logo {
  width: 120px;
  height: 31px;
  background: rgba(255, 255, 255, 0.2);
  margin: 16px 28px 16px 0;
  float: left;
}
</style>
